package com.leenmvc.core.security.entity.schema;


import com.leenmvc.core.annotation.DbInfo;
import com.leenmvc.core.base.BaseEntity;

import java.math.BigInteger;

/**
 *
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2020-03-05
 */
@DbInfo(value = "COLUMNS", comment = "表字段", schema = "dataSource_information_schema_dbinfo")
public class Columns extends BaseEntity {

    /**
     *
     */
	private String tableCatalog;
    /**
     *
     */
	private String tableSchema;
    /**
     *
     */
	private String tableName;
    /**
     *
     */
	private String columnName;
    /**
     *
     */
	private Long ordinalPosition;
    /**
     *
     */
	private String columnDefault;
    /**
     *
     */
	private String isNullable;
    /**
     *
     */
	private String dataType;
    /**
     *
     */
	private BigInteger characterMaximumLength;
    /**
     *
     */
	private Long characterOctetLength;
    /**
     *
     */
	private Long numericPrecision;
    /**
     *
     */
	private Long numericScale;
    /**
     *
     */
	private Long datetimePrecision;
    /**
     *
     */
	private String characterSetName;
    /**
     *
     */
	private String collationName;
    /**
     *
     */
	private String columnType;
    /**
     *
     */
	private String columnKey;
    /**
     *
     */
	private String extra;
    /**
     *
     */
	private String privileges;
    /**
     *
     */
	private String columnComment;

    public String getTableCatalog() {
        return tableCatalog;
    }

    public void setTableCatalog(String tableCatalog) {
        this.tableCatalog = tableCatalog;
    }

    public String getTableSchema() {
        return tableSchema;
    }

    public void setTableSchema(String tableSchema) {
        this.tableSchema = tableSchema;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getColumnName() {
        return columnName;
    }

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }

    public Long getOrdinalPosition() {
        return ordinalPosition;
    }

    public void setOrdinalPosition(Long ordinalPosition) {
        this.ordinalPosition = ordinalPosition;
    }

    public String getColumnDefault() {
        return columnDefault;
    }

    public void setColumnDefault(String columnDefault) {
        this.columnDefault = columnDefault;
    }

    public String getIsNullable() {
        return isNullable;
    }

    public void setIsNullable(String isNullable) {
        this.isNullable = isNullable;
    }

    public String getDataType() {
        return dataType;
    }

    public void setDataType(String dataType) {
        this.dataType = dataType;
    }

    public Long getCharacterMaximumLength() {
        if(this.characterMaximumLength == null) return 0l;
        return characterMaximumLength.longValue();
    }

    public void setCharacterMaximumLength(BigInteger characterMaximumLength) {
        this.characterMaximumLength = characterMaximumLength;
    }

    public void setCharacterMaximumLength(Long characterMaximumLength) {
        this.characterMaximumLength = new BigInteger(characterMaximumLength.toString());
    }

    public Long getCharacterOctetLength() {
        return characterOctetLength;
    }

    public void setCharacterOctetLength(Long characterOctetLength) {
        this.characterOctetLength = characterOctetLength;
    }

    public Long getNumericPrecision() {
        return numericPrecision;
    }

    public void setNumericPrecision(Long numericPrecision) {
        this.numericPrecision = numericPrecision;
    }

    public Long getNumericScale() {
        return numericScale;
    }

    public void setNumericScale(Long numericScale) {
        this.numericScale = numericScale;
    }

    public Long getDatetimePrecision() {
        return datetimePrecision;
    }

    public void setDatetimePrecision(Long datetimePrecision) {
        this.datetimePrecision = datetimePrecision;
    }

    public String getCharacterSetName() {
        return characterSetName;
    }

    public void setCharacterSetName(String characterSetName) {
        this.characterSetName = characterSetName;
    }

    public String getCollationName() {
        return collationName;
    }

    public void setCollationName(String collationName) {
        this.collationName = collationName;
    }

    public String getColumnType() {
        return columnType;
    }

    public void setColumnType(String columnType) {
        this.columnType = columnType;
    }

    public String getColumnKey() {
        return columnKey;
    }

    public void setColumnKey(String columnKey) {
        this.columnKey = columnKey;
    }

    public String getExtra() {
        return extra;
    }

    public void setExtra(String extra) {
        this.extra = extra;
    }

    public String getPrivileges() {
        return privileges;
    }

    public void setPrivileges(String privileges) {
        this.privileges = privileges;
    }

    public String getColumnComment() {
        return columnComment;
    }

    public void setColumnComment(String columnComment) {
        this.columnComment = columnComment;
    }
}
